package gui;


public class JFApp extends javax.swing.JFrame {

    
    public JFApp() {
        initComponents();
    }

    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jDesktopPane1 = new javax.swing.JDesktopPane();
        menuBarra = new javax.swing.JMenuBar();
        menuArquivo = new javax.swing.JMenu();
        menuCadastroAlunos = new javax.swing.JMenuItem();
        menuCadastroProfessores = new javax.swing.JMenuItem();
        menuSobre = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        menuArquivo.setText("Arquivo");

        menuCadastroAlunos.setText("Matricula de Aluno");
        menuCadastroAlunos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuCadastroAlunoslunosActionPerformed(evt);
            }
        });
        menuArquivo.add(menuCadastroAlunos);

        menuCadastroProfessores.setText("Cadastro de Professor");
        menuCadastroProfessores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuCadastroProfessoresrofessoresActionPerformed(evt);
            }
        });
        menuArquivo.add(menuCadastroProfessores);

        menuBarra.add(menuArquivo);

        menuSobre.setText("Sobre");
        menuBarra.add(menuSobre);

        setJMenuBar(menuBarra);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 677, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 483, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void menuCadastroAlunoslunosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuCadastroAlunoslunosActionPerformed
        JIFCadastroAluno cadastroA = new JIFCadastroAluno();
        // Adicionando Janela ao componete area de trabalho
        jDesktopPane1.add(cadastroA);
        // Exibi o componete
        cadastroA.show();
    }//GEN-LAST:event_menuCadastroAlunoslunosActionPerformed

    private void menuCadastroProfessoresrofessoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuCadastroProfessoresrofessoresActionPerformed
       
        JIFCadastroDeProfessor cadastroP = new JIFCadastroDeProfessor();
        jDesktopPane1.add(cadastroP);
        cadastroP.show();        
    }//GEN-LAST:event_menuCadastroProfessoresrofessoresActionPerformed

   
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(JFApp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(JFApp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(JFApp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(JFApp.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JFApp().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JMenu menuArquivo;
    private javax.swing.JMenuBar menuBarra;
    private javax.swing.JMenuItem menuCadastroAlunos;
    private javax.swing.JMenuItem menuCadastroProfessores;
    private javax.swing.JMenu menuSobre;
    // End of variables declaration//GEN-END:variables
}
